package org.example.datascreen.repository;

import org.example.datascreen.eneity.CameraData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CameraDataRespository extends JpaRepository<CameraData, Long> {

    @Query("SELECT cd.photoURL FROM CameraData cd ORDER BY cd.createdTime DESC LIMIT 7")
    List<String> findLatest7PhotoURLs();

}
